#ifndef TEXTBUTTON_H
#define TEXTBUTTON_H

#include <QLabel>
#include <QMouseEvent>
#include <QString>

class TextButton : public QLabel
{
    Q_OBJECT
public:
    explicit TextButton(QWidget *parent = 0, QString btnText = QString::QString("TextButton"), QString textColor = QString::QString("white"), QString mouseoverTextColor = QString::QString("red"));

    void setButtonText(QString newText);
    void setTextColor(QString newColor);
    void setMouseoverColor(QString newColor);

    QString getButtonText() { return text; }
    QString getTextColor() { return color; }
    QString getMouseoverColor() { return mouseoverColor; }

signals:
    void clicked(QMouseEvent *);

private slots:
    void mousePressEvent(QMouseEvent *);
    void enterEvent(QEvent *);
    void leaveEvent(QEvent *);

private:
    QString text, color, mouseoverColor;
    bool entered;

    void updateText();
};

#endif // TEXTBUTTON_H
